Repository navigation
refactor(orchestration): consolidate steering and retire task tools - #499
Conversation
Update the detached subagent steering tests to expect the fallback route and a single fallback call when the task has already failed, and assert that steering through the live handle injects the user's additional context into the subagent. Auto-committed-on: dragonfly
Adds an assertion that the counting callback is never invoked when steering a detached subagent on an unsupported lane. This guards against the rejection path silently dispatching work before returning the error. Auto-committed-on: dragonfly
… module The steering logic for detached subagents now lives in a dedicated steering module rather than under the detached subagent tree. The behaviour is unchanged; the move gives the lane rules and idempotency handling a clearer home as more control surfaces adopt them. Auto-committed-on: dragonfly
Moves the detached subagent steering API out of the subagent module and into its own top-level steering module so it can be reused independently. Introduces a SteerFallback trait to describe the host-provided delivery path, and steering now falls back to the host when the child is finished or has no live handle instead of rejecting the steer outright. Auto-committed-on: dragonfly
SteeringRegistry now lives in a dedicated steering_registry module and is re-exported from the crate root. The graph crate's re-exports were trimmed to match, dropping the orchestration tool helpers it no longer needs to surface. Auto-committed-on: dragonfly
The crate no longer exposes the orchestration control tools or the restart-recovery helpers, leaving it as the graph-independent task model, store implementations and detached task registry. The documentation was trimmed to match the reduced surface. Auto-committed-on: dragonfly
…ntrol_and_steer.rs,crates/tinya Auto-committed-on: dragonfly
The router no longer builds restart recovery notes, dropping the restart_recovery_note method and its supporting tests. The recovery note logic now lives elsewhere, so the router keeps only its completion bookkeeping responsibilities. Auto-committed-on: dragonfly
Introduces a small helper that builds a graph-kind OrchestrationTaskSpec so tests can construct graph tasks without repeating the boilerplate. Also trims the module doc comment to match the tests it actually describes. Auto-committed-on: dragonfly
This change refactors the public API exports in `subagent` and `tinyagents-tasks` to better reflect the current structure and responsibilities of the modules. It also updates documentation across several crates to clarify the role of the task store and steering mechanisms. Auto-committed-on: dragonfly
…back Documentation now states that lane and ownership validation runs before the request id is consumed, and that a terminal task with retained metadata is delivered through the host fallback. The test name and store doc comments were updated to match the current behaviour. Auto-committed-on: dragonfly
The steering path previously filtered out registry lookup failures and fell through to the fallback queue, silently swallowing real errors. The lookup result is now matched explicitly so that "no handle" and "already done" fall back as before while any other registry error is propagated to the caller. Auto-committed-on: dragonfly
The steering fallback bound now requires a callable returning a future instead of only the SteerFallback trait, so callers can pass async closures directly. The trait bound is kept alongside the new Future associated type to preserve existing behaviour. Auto-committed-on: dragonfly
The two steer_detached functions now take a single F: SteerFallback<M> bound instead of a separate FnOnce plus Future parameter, letting the trait own its future type. Tests were updated to use a named RecordingFallback struct and explicit closure parameter types. Auto-committed-on: dragonfly
Adds an end-to-end test exercising the control and steer paths so the interrupt and redirection behaviour is verified against a running agent. Auto-committed-on: dragonfly
The end-to-end suite now only covers middleware lifecycle controls and a preloaded steering cancellation delivered to a real run. The steering registry bridge and orchestrate_list filtering tests were dropped along with their helpers and now-unused imports. Auto-committed-on: dragonfly
Adds a README section describing the steering module's detached steering entry points and how they fall back to the host's SteerFallback when no live child handle is available. Also notes where SteeringRegistry lives and that cancel_for_thread cancels registered children by parent thread. Auto-committed-on: dragonfly
Reformatted several expressions and import lists to satisfy rustfmt, including the steering registry accessors and the subagent re-exports. Also removed stray blank lines and reordered module declarations and re-exports for consistency. No behaviour changes. Auto-committed-on: dragonfly
Move the `use super::*;` import to the top of the file so it precedes the external crate imports. This is a purely cosmetic reordering with no behavioural change. Auto-committed-on: dragonfly
Auto-committed-on: dragonfly
Adds an end-to-end test that registers a running detached subagent and verifies steer_detached routes through the registry rather than the fallback path. The child harness is then invoked with the resolved steering handle to confirm the delivered instruction appears in the next model request. Auto-committed-on: dragonfly
Reformatted the detached child harness test to satisfy rustfmt, collapsing the RunContext construction onto one line and rewrapping the assertion on the delivered instruction. No behaviour changed. Auto-committed-on: dragonfly
Removed anyhow, async-trait and tinytools from the crate's dependency list since nothing in it references them anymore. Auto-committed-on: dragonfly
|
Warning Review limit reached
This review includes 26 billable files and costs up to $6.50. Or wait 33 minutes for your next included review. View limit details
Comment |
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Tiny Sweeper reviewVerdict: Incomplete · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): refactor(orchestration): consolidate steering and retire task tools. The pull request moves detached child steering under `tinyagents_orchestration::steering`, where the steer entry points validate lane and ownership, prefer a live registered steering handle, and otherwise deliver through a host-provided `SteerFallback`; a retained finished child now goes through that fallback instead of returning `AlreadyDone`, while terminal children never use stale handles. It also retires the model-facing task-tool surface and the restart-recovery note APIs along with their graph re-exports, relocates `SteeringRegistry` to its own module in `tinyagents-tasks`, and updates docs, manifest dependencies and tests to match. The latest-push-delta section is unavailable: the evidence contains no trusted base-to-head diff comparison, so no push delta is described. Unreviewed paths
Review snapshot
Completeness: Incomplete What changedSteering for detached children is consolidated into `crates/tinyagents-orchestration/src/steering.rs`, exported from `crates/tinyagents-orchestration/src/lib.rs`, and the old `subagent::detached::steer` module and its re-exports are removed from `crates/tinyagents-orchestration/src/subagent/detached/mod.rs` and `crates/tinyagents-orchestration/src/subagent/mod.rs`. `SteerError::AlreadyDone` and the terminal-status early rejection are gone; the steer path now looks up the live handle, uses it only for non-terminal tasks, and otherwise awaits a `SteerFallback::enqueue`. The `tinyagents-tasks` crate loses `tool.rs` (`OrchestrationTool`, `OrchestrationToolKind`, schemas, overlay), `recovery.rs`, and `CompletionRouter::restart_recovery_note`, with `SteeringRegistry` moved to `crates/tinyagents-tasks/src/steering_registry.rs`; the graph shim loses the corresponding re-exports and the manifest loses the now-unused `anyhow`, `async-trait` and `tinytools` edges. Documentation in the graph, orchestration, tasks, session run-ledger and subagent-recursion docs is rewritten to describe host-owned orchestration tools and steering. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before merge
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5c0a97c3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…yagents-graph/src/orchestration Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Consolidate detached child steering under
tinyagents_orchestration::steeringand exposeSteerFallbackfor host queues. A retained finished child now uses that fallback instead of returningAlreadyDone; live children still receive steering through their registered handle. Ownership, supported lanes, request-ID limits and deduplication continue to apply.Remove the retired task-tool and restart-recovery APIs and their graph exports. Keep
SteeringRegistryintinyagents-tasks, whereDetachedTaskRegistrydepends on it. Preserve independent middleware, task-store and completion-router tests.Refs senamakel#59. Part of tinyhumansai/openhuman#8088.
Draft dependency: canonical PRs #496 and #497 must land first. After they merge, merge canonical main into this branch, verify the resulting diff and gates, and mark this PR ready.
Validation:
4acd1a578ede5bfde0e22b7866a3f96d4e4b8773, the full workspace all-target check, task-crate all-target Clippy, 115 task tests, andcargo machete cratespass.AlreadyDoneinstead of fallback).The wiki is a separate repository. Its reviewed patch is included below for publication after the source change lands; this PR leaves the existing wiki gitlink unchanged.
Wiki follow-up patch